package com.example.kotlin_library
import com.linuxx64.ktlibrary.*
import kotlinx.cinterop.ExperimentalForeignApi
import kotlinx.cinterop.toKString

class LinuxPersonInfo() : PersonInfo {
    @OptIn(ExperimentalForeignApi::class)
    override val age: Int = GetPersonAge()
    @OptIn(ExperimentalForeignApi::class)
    override val name: String = GetPersonName()?.toKString() ?: ""
}

actual fun getPersonInfo(): PersonInfo = LinuxPersonInfo()

@OptIn(ExperimentalForeignApi::class)
actual fun getSum(a: Int, b: Int): Int = Sum(a, b)